var e = require;
var t = module;
var o = exports;
var n = o;
Object.defineProperty(n, "__esModule", {value: !0});
var i = e("BundleNames"),
    a = (function () {
        function e() {
            (this._bundles = {}), (this._bundles[i.default.Resources] = cc.resources);
        }
        return (
            Object.defineProperty(e, "instance", {
                get: function () {
                    return e._instance || (e._instance = new e()), e._instance;
                },
                enumerable: !1,
                configurable: !0
            }),
            (e.prototype.loadBundle = function (e, t, o, n) {
                var i = this;
                this._bundles[e]
                    ? o && o(this._bundles[e])
                    : cc.assetManager.loadBundle(
                          e,
                          {
                              onFileProgress: function (e) {
                                  var o = e.progress;
                                  t && t(o / 100);
                              }
                          },
                          function (t, a) {
                              t ? n && n(t) : ((i._bundles[e] = a), o && o());
                          }
                      );
            }),
            (e.prototype.getBundle = function (e) {
                return this._bundles[e];
            }),
            (e._instance = null),
            e
        );
    })();
n.default = a;
